import request from '@/utils/request'

export function startProcess(data) {
  return request({
    url: `/user/process/startProcess`,
    data,
    method: 'post'
  })
}

// 获取审批列表
export function getApprovalsList(data) {
  return request({
    url: `/user/process/instance/${data.page}/${data.size}`,
    method: 'put',
    data
  })
}

// 获取审批类型
export function getApprovalsType() {
  return request({
    url: '/user/process/definition'
  })
}

// 提交审核
export function postApprovals(data) {
  return request({
    url: '/user/process/instance/commit',
    method: 'put',
    data
  })
}
